
local M={}

local Goods_Cfg=_G.CommonOHOH.config.Goods
M.GoodsId=5004 -- 商品Id
M.Count=500--训练X次触发新手礼包购买(训练500次弹)
M.LimitTime=30*60--限制购买时间
M.GoodCfg=Goods_Cfg[M.GoodsId]
function M.GetPackData()
    return M.GoodCfg.itemData
end;

function M.IsCanBuy(id,gtype,dataBase)
    if gtype=="fristPackage" and   dataBase:GetData("sate").fristPackage then
        return true
    end
end

function M.GetPackDes()
   local d={
        price=M.GoodCfg.price
   }
   local BigNumberHelper = _G.ClientOHOH.load.BigNumberHelper();

   for k,v in pairs(M.GetPackData()) do

        local key,id= _G.CommonOHOH.load.ItemTool().GetKeyAndID(k)
        if key=="weapon" then
                local damge=  _G.CommonOHOH.load.WeaponTool().Calculate_power(id)
                d["weapon"]=BigNumberHelper:ToString(damge)
        elseif key=="pets"  then
            local boost= _G.CommonOHOH.load.PetTool().GetBoostStrByPetId(id)
            d["pets"]=boost
        else
            local n=BigNumberHelper:ToString(v)
            d[id]=n
        end
   end
   return d

end

return M